﻿using System.ComponentModel.DataAnnotations;
using YNTK.Dependency;

namespace YNTK.System.Entitys.Dto.Resources
{
    /// <summary>
    /// 添加友情链接请求模型
    /// </summary>
    [SuppressSniffer]
    public class AddLinkRequestModel
    {
        /// <summary>
        /// 名称
        /// </summary>
        [Required(ErrorMessage = "链接名称不能为空")]
        public string name { get; set; }

        /// <summary>
        /// 链接
        /// </summary>
        [Required(ErrorMessage = "链接不能为空")]
        public string link { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public long? sortCode { get; set; }

        /// <summary>
        /// 是否启用，1.启用 
        /// </summary>
        public int? enabledMark { get; set; }

        /// <summary>
        /// 友情链接log服务器存储地址
        /// </summary>
        public string logUrl { get; set; }
    }

    /// <summary>
    /// 修改友情链接请求模型
    /// </summary>
    [SuppressSniffer]
    public class UpdateLinkRequestModel: AddLinkRequestModel
    {
        /// <summary>
        /// id
        /// </summary>
        [Required(ErrorMessage = "唯一标识不能为空")]
        public string id { get; set; }
    }

    /// <summary>
    /// 友情链接数据传输模型
    /// </summary>
    [SuppressSniffer]
    public class LinkListDto
    {
        /// <summary>
        /// id
        /// </summary>
        public string id { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string name { get; set; }

        /// <summary>
        /// 链接
        /// </summary>
        public string link { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string description { get; set; }

        /// <summary>
        /// 排序码
        /// </summary>
        public long? sortCode { get; set; }

        /// <summary>
        /// 启用/禁用,1.启用
        /// </summary>
        public int? enabledMark { get; set; }

        /// <summary>
        /// 友情链接log服务器存储地址
        /// </summary>
        public string logUrl { get; set; }

        /// <summary>
        /// 友情链接log base64
        /// </summary>
        public string logUrlBase64 { get; set; }
    }

}
